package com.example.basemvp.login;

import com.example.basemvp.base.BaseModel;
import com.example.basemvp.bean.UserBean;
import com.example.basemvp.login.loginContract.LoginContract;

public class LoginModel extends BaseModel<LoginPresenter, LoginContract.Model> {
    @Override
    protected LoginContract.Model getContract() {
        return new LoginContract.Model() {
            @Override
            public void execueLogin(String username, String pwd) {
                if("123".equals(username)&&"456".equals(pwd)){
                    presenter.getContract().responesLogin(new UserBean("登录成功"));
                }
                else{
                    presenter.getContract().responesLogin(new UserBean("登录失败"));
                }
            }
        };
    }

    public LoginModel(LoginPresenter presenter) {
        super(presenter);
    }
}
